Name:
rtrim$() -- trim spaces at the right end of a string
Synopsis:
a$=rtrim$(b$)
Description:
The rtrim$-function removes all whitespace from the right end of a string and returns the result.
Example:
input "Please answer 'yes' or 'no' : " a$
a$=lower$(ltrim$(rtrim$(a$)))
if (len(a$)>0 and a$=left$("yes",len(a$))) then
"Yes ..."
else
print "No ..."
endif
Explanation:
This example prompts for an answer and removes any spaces, which might precede the input; therefore it is even prepared for the (albeit somewhat patological case), that the user first hits space before entering his answer.
Related: ltrim$, trim$